<template>
  <div class="app-container">
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-refresh-right"
          size="mini"
          @click="handleQuery"
          >刷新</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-star-off"
          size="mini"
          :disabled="single"
          @click="handleDetermine"
          v-hasPermi="['quality:firstPartConfirmation:save']"
        >
          判定
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          :loading="exportLoading"
          @click="handleExport('#firstPartConfirmation', '品管首件确认作业')"
        >
          导出
        </el-button>
      </el-col>

      <!-- 分页效果 -->
      <el-col :span="2.2" style="position: absolute; right: 0px; top: 0">
        <Page
          style="margin-right: 0px"
          :current="queryParams.pageNum"
          :page-size="queryParams.pageSize"
          :total="total"
          @on-change="pageChange"
          simple
        ></Page>
      </el-col>
      <right-toolbar
        :showSearch.sync="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>

    <el-table
      id="firstPartConfirmation"
      highlight-current-row
      border
      stripe
      :height="tableH"
      v-loading="loading"
      :data="firstPartConfirmationList"
      @row-click="handleClick"
      :header-cell-style="{ 'text-align': 'center' }"
    >
      <el-table-column label="#" type="index" width="29" align="center" />
      <el-table-column
        label="机台"
        :show-overflow-tooltip="true"
        width="80"
        align="center"
        prop="sjlJtbh"
      />
      <el-table-column
        label="制造单号"
        :show-overflow-tooltip="true"
        width="150"
        align="center"
        prop="moeZzdh"
      />
      <el-table-column
        label="销售单号"
        :show-overflow-tooltip="true"
        width="120"
        align="center"
        prop="moeSodh"
      />
      <el-table-column
        label="物料代码"
        :show-overflow-tooltip="true"
        width="120"
        align="center"
        prop="sjlWldm"
      />
      <el-table-column
        label="品名规格"
        :show-overflow-tooltip="true"
        min-width="200"
        prop="itmPmgg"
      />
      <!-- <el-table-column label="穴数" :show-overflow-tooltip="true" width="50" align="center" prop="moeXs" /> -->
      <el-table-column
        label="单位净重(kg)"
        :show-overflow-tooltip="true"
        width="98"
        align="center"
        prop="itmJz"
      />
      <el-table-column
        label="发出人员"
        :show-overflow-tooltip="true"
        width="73"
        align="center"
        prop="sjlJlrymc"
      />
      <el-table-column
        label="开始时间"
        :show-overflow-tooltip="true"
        align="center"
        prop="sjlKssj"
        width="120"
      >
        <template #default="scope">
          <span>{{
            parseTime(scope.row.sjlKssj, "{y}-{m}-{d} {h}:{i}:{s}")
          }}</span>
        </template>
      </el-table-column>
    </el-table>

    <!-- 判定品管首件确认作业 -->
    <el-dialog
      v-model="determine"
      class="pdDialog"
      :close-on-click-modal="false"
      width="1000px"
    >
      <table style="width: 100%">
        <!-- logo -->
        <tr>
          <td style="width: 40%">
            <img
              src="@/assets/images/favorite2.png"
              style="height: 32px"
              mode="aspectFit"
            />
          </td>
          <td style="">
            <h3
              style="letter-spacing: 2px; font-size: 1.2rem; font-weight: bold"
            >
              COLMO高端线首件确认表
            </h3>
          </td>
        </tr>
      </table>

      <table class="table-border" style="text-align: center">
        <colgroup>
          <col style="width: 50px" />
          <col style="width: 120px" />
          <col style="width: 150px" />
          <col style="width: auto" />
          <col style="width: 100px" />
          <col style="width: 100px" />
        </colgroup>
        <tr>
          <td colspan="3"><p>产品名称</p></td>
          <td><p>产品编号</p></td>
          <td colspan="2"><p>生产设备编号</p></td>
        </tr>
        <tr>
          <td colspan="3">
            <p>{{ firstPieceData.itmWlpm }}</p>
          </td>
          <td>
            <p>{{ firstPieceData.itmCustwldm }}</p>
          </td>
          <td colspan="2">
            <p>{{ firstPieceData.gsjlJtbh }}</p>
          </td>
        </tr>
        <tr style="letter-spacing: 2px">
          <td colspan="3"><p>报检日期</p></td>
          <td>
            <p>数量</p>
          </td>
          <td colspan="2"><p>报检人</p></td>
        </tr>
        <tr>
          <td colspan="3">
            <p>{{ $moment(firstPieceData.gsjlKssj).format() }}</p>
          </td>
          <td>
            <p>{{ firstPieceData.gsjlNum }}</p>
          </td>
          <td colspan="2">
            <p>{{ firstPieceData.gsjlJlry }}</p>
          </td>
        </tr>
        <tr style="background-color: #ccc">
          <td><p>序号</p></td>
          <td><p>检验项目</p></td>
          <td colspan="2"><p>标准要求</p></td>
          <td><p>实测</p></td>
          <td><p>判定</p></td>
        </tr>
        <tr>
          <td><p>1</p></td>
          <td><p>外观</p></td>
          <td colspan="2" class="align-left">
            <p>
              1、白色产品表面不允许有顶自、流痕、划痕、料花、毛刺、黑点浇口丝等缺陷，2、进胶口、毛边修理平整，修边良好不得有波浪纷现象，符合封样或图纸等技术要求，3、产品表面不得有油污，生产过程中不得使用脱模剂:4、产品不得成型不良，裂纹等严重不良现象，5、缩印、变形按样品控制。
            </p>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlExterior"
              >
                <el-option
                  v-for="dict of listTest"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
          <td>
            <dict-tag
              :options="listJudg"
              :value="firstPieceData.gsjlExterior"
            />
          </td>
        </tr>
        <tr>
          <td rowspan="4"><p>2</p></td>
          <td rowspan="4"><p>结构要点</p></td>
          <td class="align-left"><p>组件尺寸</p></td>
          <td>
            <p>
              {{ firstPieceData.itmJccc1 }}（{{
                firstPieceData.itmJccc1X + "~" + firstPieceData.itmJccc1S
              }}）
            </p>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-input
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlZjccv"
              />
            </HdFormItem>
          </td>
          <td>
            <dict-tag :options="listJudg" :value="firstPieceData.gsjlZjcc" />
          </td>
        </tr>
        <tr>
          <td class="align-left"><p>海绵长度</p></td>
          <td class="align-left"><p>反面红线要求长度要规范。</p></td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlHmcd"
              >
                <el-option
                  v-for="dict of listTest"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
          <td>
            <dict-tag :options="listJudg" :value="firstPieceData.gsjlHmcd" />
          </td>
        </tr>
        <tr>
          <td class="align-left"><p>形状海统</p></td>
          <td class="align-left"><p>正面风道的形状海绵不可漏贴，起皱</p></td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlXzht"
              >
                <el-option
                  v-for="dict of listTest"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
          <td>
            <dict-tag :options="listJudg" :value="firstPieceData.gsjlXzht" />
          </td>
        </tr>
        <tr>
          <td class="align-left"><p>装饰件装配</p></td>
          <td class="align-left"><p>装饰件宽边在风道反面与防呆卡位对准</p></td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlZsjzp"
              >
                <el-option
                  v-for="dict of listTest"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
          <td>
            <dict-tag :options="listJudg" :value="firstPieceData.gsjlZsjzp" />
          </td>
        </tr>
        <tr>
          <td><p>3</p></td>
          <td><p>色差光泽度</p></td>
          <td colspan="2" class="align-left">
            <p>与标准色板确认色差AE≤0.8，光泽度要符合标准管控要求。</p>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-input
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlScgzdv"
              />
            </HdFormItem>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlScgzd"
              >
                <el-option
                  v-for="dict of listTest"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
        </tr>
        <tr>
          <td rowspan="5"><p>4</p></td>
          <td rowspan="5"><p>配合</p></td>
          <td class="align-left"><p>间隙</p></td>
          <td class="align-left"><p>组件直线度≤3mm</p></td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-input
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlJxv"
              />
            </HdFormItem>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlJx"
              >
                <el-option
                  v-for="dict of listTest"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
        </tr>
        <tr>
          <td class="align-left"><p>平面直线度(F)</p></td>
          <td class="align-left"><p>平面直线度≤3mm</p></td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-input
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlPmzxdv"
              />
            </HdFormItem>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlPmzxd"
              >
                <el-option
                  v-for="dict of listTest"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
        </tr>
        <tr>
          <td class="align-left"><p>组装</p></td>
          <td class="align-left">
            <p>组件装配间隙均匀，间隙差符合设计间隙≤5mm</p>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-input
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlPhZzv"
              />
            </HdFormItem>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlPhZz"
              >
                <el-option
                  v-for="dict of listTest"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
        </tr>
        <tr>
          <td class="align-left"><p>导线和端子</p></td>
          <td class="align-left">
            <p>
              导线和端子的规格和型号符合技术列表要求，导线保护层无破损、变色，端子连接正确可靠。
            </p>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlDxhdz"
              >
                <el-option
                  v-for="dict of listTest"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
          <td>
            <dict-tag :options="listJudg" :value="firstPieceData.gsjlDxhdz" />
          </td>
        </tr>
        <tr>
          <td class="align-left"><p>装配</p></td>
          <td class="align-left">
            <p>装配应连接牢固，无松脱晃动、卡扣断裂等现象。</p>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlZp"
              >
                <el-option
                  v-for="dict of listTest"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
          <td>
            <dict-tag :options="listJudg" :value="firstPieceData.gsjlZp" />
          </td>
        </tr>
        <tr>
          <td><p>5</p></td>
          <td><p>结构</p></td>
          <td colspan="2" class="align-left">
            <p>比对样品、不可影响装配，确认形状海绵贴粘贴到位、不可漏贴</p>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlJg"
              >
                <el-option
                  v-for="dict of listTest2"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
          <td>
            <dict-tag :options="listJudg" :value="firstPieceData.gsjlJg" />
          </td>
        </tr>
        <tr>
          <td><p>6</p></td>
          <td><p>组装</p></td>
          <td colspan="2" class="align-left">
            <p>泡沫密封及玻璃压合不可存在段差</p>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlZz"
              >
                <el-option
                  v-for="dict of listTest2"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
          <td>
            <dict-tag :options="listJudg" :value="firstPieceData.gsjlZz" />
          </td>
        </tr>
        <tr>
          <td><p>7</p></td>
          <td><p>包装</p></td>
          <td colspan="2" class="align-left">
            <p>核对标签，产品名称，物料编码要与实物一致。</p>
          </td>
          <td>
            <HdFormItem :readOnly="readOnly">
              <el-select
                size="mini"
                placeholder=""
                v-model="firstPieceData.gsjlBz"
              >
                <el-option
                  v-for="dict of listTest2"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                  :key="dict.dictValue"
                ></el-option>
              </el-select>
            </HdFormItem>
          </td>
          <td>
            <dict-tag :options="listJudg" :value="firstPieceData.gsjlBz" />
          </td>
        </tr>
        <tr>
          <td colspan="6">
            <table style="width: 100%" class="noborder">
              <tr>
                <td
                  style="
                    height: 60px;
                    vertical-align: text-top;
                    background: #ccc;
                    text-indent: 6px;
                  "
                  align="left"
                >
                  检验结果：
                  <p style="text-align: center">
                    <HdFormItem :readOnly="readOnly">
                      <el-select
                        v-model="firstPieceData.gsjlPdjg"
                        placeholder="请选择"
                      >
                        <el-option
                          v-for="item in resultList"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                        ></el-option>
                      </el-select>
                    </HdFormItem>
                  </p>
                  <p style="text-align: right; margin-right: 5rem">
                    质检员 (签名):{{ firstPieceData.sjlQrry }}
                  </p>
                </td>
              </tr>
              <tr>
                <td
                  style="
                    border-top: 1px solid #000;
                    height: 3rem;
                    vertical-align: text-top;
                    text-indent: 6px;
                  "
                  align="left"
                >
                  处理意见：
                  <p style="text-align: center">
                    {{ firstPieceData.sjlFpdesc }}
                  </p>
                  <p style="text-align: right; margin-right: 5rem">
                    复核人员 (签名):{{ firstPieceData.sjlChkry }}
                  </p>
                </td>
              </tr>
              <tr>
                <td
                  style="
                    border-top: 1px solid #000;
                    height: 60px;
                    vertical-align: text-top;
                    background: #ccc;
                    text-indent: 6px;
                  "
                  align="left"
                >
                  审核结果：
                  <p style="text-align: center">
                    <DictTag
                      :value="2"
                      keyName="first_part_state"
                      type="text"
                    ></DictTag>
                  </p>
                  <p style="text-align: right; margin-right: 5rem">
                    审核人 (签名):{{ firstPieceData.sjlAuditPeople }}
                  </p>
                </td>
              </tr>
              <tr>
                <td style="border-top: 1px solid #000">
                  <div>
                    <div style="float: left; text-indent: 6px">说明：</div>
                    <div
                      style="float: left; letter-spacing: 2px"
                      class="align-left"
                    >
                      <p>■检验结果仅对本次样品负责。</p>
                      <p>■代首件样品确认后，方可转入批量生产。</p>
                      <p>
                        ■质检员判定不合格（×）的项目，班长必须及时安排改进，解决合格后方可生产。
                      </p>
                      <p>■若有特殊重大问题，及时通知生产主任。</p>
                      <p>
                        ■若实物符合检查要求，由质检人员在“实际情况栏目”种打√。
                      </p>
                    </div>
                  </div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>

      <div slot="footer" class="dialog-footer">
        <el-button @click="handleSave">临时保存</el-button>
        <el-button @click="cancel">取 消</el-button>
        <el-button type="primary" @click="handlePD">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { getDefectiveItem } from "@/api/quality/defectiveItem";
import { exportTable } from "@/utils/ruoyi";
import {
  listFirstPartConfirmationG,
  listFirstPartConfirmationDeatilG,
  saveFirstPartConfirmationG,
} from "@/api/quality/firstPart";

export default {
  name: "firstJudgingColmo",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 导出遮罩层
      exportLoading: false,
      // 选中数组
      ids: [],
      rowData: null,
      // 非单个禁用
      single: true,
      readOnly: false,
      // 非多个禁用
      multiple: true,
      determine: false,
      // 显示搜索条件
      showSearch: true,
      openSearch: false,
      // 总条数
      total: 0,
      tableH: document.body.clientHeight > 900 ? 640 : 450,
      // 品检首件确认作业数据
      firstPartConfirmationList: [],
      firstPartDetailList: {},
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      bodyWidth: document.body.clientWidth,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: document.body.clientHeight > 900 ? 25 : 17,
        bllYydm: null,
        bllYymc: null,
      },
      // 表单参数
      form: {},
      firstPieceData: {},
      // 表单校验
      rules: {
        bllYydm: [{ required: true, message: "不良代码必填", trigger: "blur" }],
        bllYymc: [{ required: true, message: "不良描述必填", trigger: "blur" }],
      },
      colorList: [
        { value: "本色", label: "本色" },
        { value: "目视", label: "目视" },
      ],
      // 外观列表
      appearanceList: [],
      // 实测
      listTest: [
        { dictValue: "OK", dictLabel: "无异常" },
        { dictValue: "-", dictLabel: "不适用" },
        { dictValue: "NG", dictLabel: "不合格" },
      ],
      listTest2: [
        { dictValue: "OK", dictLabel: "符合" },
        { dictValue: "-", dictLabel: "不适用" },
        { dictValue: "NG", dictLabel: "不符合" },
      ],
      // 判定
      listJudg: [
        { dictValue: "OK", dictLabel: "√" },
        { dictValue: "-", dictLabel: " " },
        { dictValue: "NG", dictLabel: "X" },
      ],
      // 判定结果列表
      resultList: [
        { value: "OK", label: "OK" },
        { value: "NG", label: "NG" },
      ],
    };
  },
  created() {
    this.getList();
    this.getDicts("quality_appearance").then((response) => {
      this.appearanceList = response.data;
    });
  },
  watch: {
    "firstPieceData.gsjlZjccv": function (val, old) {
      const that = this.firstPieceData;
      if (!that.itmJccc1X || !that.itmJccc1X || !val) {
        that.gsjlZjcc = "-";
        return;
      } else {
        if (val >= that.itmJccc1X && val <= that.itmJccc1S) {
          that.gsjlZjcc = "OK";
        } else {
          that.gsjlZjcc = "NG";
        }
      }
    },
  },
  methods: {
    /** 查询品管确认作业列表 */
    getList() {
      this.loading = true;
      listFirstPartConfirmationG(this.queryParams).then((response) => {
        this.firstPartConfirmationList = response.rows;
        this.total = response.total;
        this.loading = false;
        if (this.total > 0) {
          this.handleClick(this.firstPartConfirmationList[0]);
        }
      });
    },
    // 处理点击事件
    handleClick(row) {
      this.rowData = row;
      this.single = false;
    },
    // 判定页 临时保存
    handleSave() {
      this.firstPieceData.flag = "1";
      saveFirstPartConfirmationG(this.firstPieceData).then((res) => {
        this.msgSuccess("临时保存成功！");
        this.getList();
        this.cancel();
      });
    },
    // 判定页“确定”
    handlePD() {
      // 校验部分
      var that = this.firstPieceData;

      // 要校验的字段
      const fields = [
        "gsjlExterior",
        "gsjlZjcc",
        "gsjlHmcd",
        "gsjlXzht",
        "gsjlZsjzp",
        "gsjlScgzd",
        "gsjlJx",
        "gsjlPmzxd",
        "gsjlPhZz",
        "gsjlDxhdz",
        "gsjlZp",
        "gsjlJg",
        "gsjlZz",
        "gsjlBz",
        "gsjlPdjg",
        "gsjlZjccv",
        "gsjlScgzdv",
        "gsjlJxv",
        "gsjlPmzxdv",
        "gsjlPhZzv",
      ];
      let notVaild = fields.some((o) => {
        return !that[o] || that[o] == "";
      });
      if (notVaild) {
        this.msgError("数据不全,请完成判定在提交");
        return false;
      }

      if (that.gsjlPdjg == "OK") {
        notVaild = fields.some((o) => {
          return that[o] === "NG";
        });
        if (notVaild) {
          this.msgError("实测存在不合格项，不能判定合格！");
          return false;
        }
      }

      saveFirstPartConfirmationG(this.firstPieceData).then((res) => {
        this.msgSuccess("保存成功！");
        this.getList();
        this.cancel();
      });
    },

    // 修改页取消按钮
    cancel() {
      this.open = false;
      this.determine = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        sjlJtbh: null,
        moeZzdh: null,
        moeSodh: null,
        itmCustwldm: null,
        sjlWldm: null,
        itmPmgg: null,
        moeMjbh: null,
        mjmMjmc: null,
        moeXs: null,
        itmSkzl: null,
        itmJz: null,
        itmMz: null,
        sjlJlrymc: null,
        sjlKssj: null,
        sjlId: null,
        sjlGlid: null,
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加品检不良项目";
    },
    /** 导出按钮操作 */
    handleExport(a, b) {
      exportTable(a, b);
    },
    /** 判定按钮操作 */
    handleDetermine() {
      listFirstPartConfirmationDeatilG(this.rowData.sjlId).then((res) => {
        this.firstPieceData = res.data;
        this.determine = true;
      });
    },
    /** 分页 **/
    pageChange(page) {
      this.queryParams.pageNum = page;
      this.getList();
    },
  },
};
</script>

<style scoped lang="less">
.app-container {
  .mb8 {
  }
  #firstPartConfirmation {
  }
  .pdDialog {
    .pdForm {
      .tabCheck {
        table-layout: fixed;
        border-collapse: collapse;
        border: 1px solid black;
        width: 100%;
        td,
        th {
          border: 1px solid black;
          ::v-deep .el-input-number--mini {
            width: auto;
          }
        }
        /deep/.ipt.el-input.el-input--mini {
          height: 18px;
          .el-input__inner {
            display: inline-block;
            height: 18px !important;
            border: none;
            padding: 0px !important;
            text-align: center;
          }
        }
      }
      /deep/ .appearance .el-form-item__content {
        width: calc(100% - 100px);
      }
      /deep/ .el-input-number .el-input__inner {
        padding: 0px 28px 0px 2px;
      }
    }
  }
}
</style>
